CC = g++ 

CFLAGS = -Wall

I=in.txt

RM = rm -f

MAIN = carteirochines

OBJS = graph.o

default: $(MAIN) run

$(MAIN): $(OBJS)
	@$(CC) $(CFLAGS) $(OBJS) -lm -o $(MAIN)
	@echo ""

%.o: %.cpp %.h 
	@echo " --- COMPILING OBJECT \"$@\""
	@$(CC) $(CFLAGS) $< -c 

clean:
	$(RM) $(MAIN) *.o

run: $(MAIN)
	./$(MAIN) < $(I)
